package org.gpf.simpleFactory.markDiscount;
/**
 * 打折收费子类
 * @author gaopengfei
 * @date 2015-4-26 下午11:18:38
 */
public class CashRebate extends CashSuper {

	private double moneyRebate = 1;
	
	/**
	 * 初始化的时候传入打折率
	 * @param moneyRebate 打折率
	 */
	public CashRebate(double moneyRebate) {
		this.moneyRebate = moneyRebate;
	}


	@Override
	public double acceptCash(double money) {

		return money * moneyRebate;
	}

}
